<!DOCTYPE HTML>
<html>
	<head>
		<title></title>
		<meta charset="utf-8" />
	</head>
	<body>
		<center>
			<h3>讲师信息管理</h3>
			@include('user.menu')
			<form action="" method="post" name="myform">
				<input type="hidden" name="_token" value="{{ csrf_token() }}" />
				<input type="hidden" name="_method" value="delete" />
			</form>
			<table border="1">
				<tr>
					<th>序号</th>
					<th>姓名</th>
					<th>密码</th>
					<th>性别</th>
					<th>年龄</th>
					<th>操作</th>
				</tr>
				@foreach($data as $v)
					<tr>
						<td>{{ $v->id }}</td>
						<td>{{ $v->name }}</td>
						<td>{{ $v->password }}</td>
						<td>{{ $v->sex }}</td>
						<td>{{ $v->age }}</td>
						<td>
							<a href="javascript:test({{ $v->id }})">删除 | </a>
							<a href="/user/{{ $v->id }}/edit">修改</a>
						</td>
					</tr>
				@endforeach
			</table>
		</center>
	</body>
	<script type="text/javascript">
		function test(aaa) {
			if(confirm('确认删除')) {
				var bbb = document.myform;
				bbb.action="/user/"+aaa;
				bbb.submit();
			}	
		}
	</script>
</html>